package com.taotao.order.factory;


import com.taotao.common.core.domain.Result;
import com.taotao.order.RemoteOrderService;

import com.taotao.order.domain.PaymentFlow;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 文件服务降级处理
 *
 * @author ruoyi
 */
@Component
public class RemoteOrderFallbackFactory implements FallbackFactory<RemoteOrderService>
{


    @Override
    public RemoteOrderService create(Throwable cause) {
        return new RemoteOrderService() {
            @Override
            public Result addTransactionFlows(PaymentFlow paymentFlow) {
                return Result.error();
            }

            @Override
            public Result findByTradeNo(String tradeNo) {
                return Result.error();
            }
        };
    }
}
